# Hero Performance Trends

> `GET /api/academy/heroes/{hero_identifier}/trends`: Academy endpoint of the Rone Arena API.

Retrieve trend information for a specific hero over a selected time window. Supports query parameters for days, rank, pagination, and localization.

Path parameters:
- **hero_identifier**: Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`.

Query parameters:
- **days**: Trend window in days. Allowed values: `7`, `15`, `30`.
- **rank**: Rank filter. Allowed values: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`.
- **size**: Number of items per page (minimum: 1).
- **index**: Page index (starting from 1).
- **lang**: Language code for localized content (default: `en`).

The response includes hero performance trend data:
- **records**: Array of hero entries, each containing:
    - **_id**: Unique record identifier.
    - **_createdAt**: Creation timestamp.
    - **_updatedAt**: Last update timestamp.
    - **data**:
        - **main_heroid**: Hero ID.
        - **bigrank**: Rank context ID.
        - **camp_type**: Camp type indicator.
        - **match_type**: Match type indicator.
        - **win_rate**: Array of daily statistics, each containing:
            - **date**: Date of record.
            - **app_rate**: Appearance rate.
            - **ban_rate**: Ban rate.
            - **win_rate**: Win rate.

This endpoint is useful for:
- Tracking hero performance changes over time.
- Identifying meta shifts across ranks.
- Guiding players in understanding how a hero’s effectiveness evolves across different ranks and timeframes.

## Request

`GET https://arena.rone.dev/api/academy/heroes/{hero_identifier}/trends`

### Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `hero_identifier` | path | string | yes |  | Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`. Name matching ignores spaces/symbols and is case-insensitive (e.g., `Luo Yi` to `luoyi`). |
| `days` | query | string | no | `7` | Time window for trend data in days. One of: `7`, `15`, `30`. |
| `rank` | query | string | no | `all` | Rank filter for hero statistics. One of: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`. |
| `size` | query | integer | no | `20` | Number of items per page. Range: 1... |
| `index` | query | integer | no | `1` | Page index for pagination. Range: 1... |
| `lang` | query | string | no | `en` | Language code for localized content. One of: `en`, `id`, `ru`, `es`, `pt`, `tr`, `ar`, `de`, `fr`, `it`, `ja`, `ko`, `th`, `vi`, `zh-CN`, `zh-TW`, `km`. |

### Example

```bash
curl -X GET 'https://arena.rone.dev/api/academy/heroes/{hero_identifier}/trends'
```

## Example response

```json
{
  "code": 0,
  "message": "OK",
  "data": {
    "records": [
      {
        "_createdAt": 1725607498066,
        "_id": "66daae4b2bc97a5ed5c98d29",
        "_updatedAt": 1774965307654,
        "data": {
          "bigrank": "9",
          "camp_type": "1",
          "main_heroid": 17,
          "match_type": "1",
          "win_rate": [
            {
              "app_rate": 0.00919,
              "ban_rate": 0.058604,
              "date": "2026-03-30",
              "win_rate": 0.450255
            }
          ]
        },
        "id": 104186,
        "sourceId": 2755185
      }
    ],
    "total": 1
  }
}
```

## Links

- Try it in the playground: https://arena.rone.dev/web/academy/heroes/{hero_identifier}/trends
- Academy endpoints: https://arena.rone.dev/web/academy.md
- OpenAPI schema: https://arena.rone.dev/api/openapi.json
